package simtester.test.pages

import geb.Module
import geb.Page

class RunningTestsPage extends Page {
    static url = 'testRun/running'
    static at = { $('title').text() == 'SimTester - Running Tests' }
    
    static content = {
        runningTestsTable {
            $('table tbody tr').collect {
                module RunningTestsRow, it
            }
        }
    }
}

class RunningTestsRow extends Module {
    static content = {
        cell { i -> $('td', i) }

        testname  { cell(1).text() }
        type      { cell(2).text() }
        status    { cell(3).text() }
        startdate { cell(4).text() }
        enddate   { cell(5).text() }
        view      { cell(6).view() }
    }
}